<!--
 * @Author: 罗微
 * @Date: 2020-09-21 20:45:04
 * @LastEditors: 岸舟
 * @LastEditTime: 2020-09-23 19:37:10
 * @Description: 
-->
<template>
<div class="sector">
    <el-table :data="allClaims" border style="width: 100%">
        <el-table-column fixed prop="_id" label="id" width="230"></el-table-column>
        <el-table-column prop="insureOrderId.productName" label="保险产品" width="200"></el-table-column>
        <el-table-column prop="adminId.nickName" label="销售员" width="150"></el-table-column>
        <el-table-column prop="clientId.nickName" label="客户姓名" width="120"></el-table-column>
        <el-table-column prop="dueTime" label="开始时间" width="130"></el-table-column>
        <el-table-column label="状态" width="150">待审核</el-table-column>
        <el-table-column fixed="right" label="操作" width="160">
            <template slot-scope="scope">
                <el-button type="text" size="small" @click="editClaims(scope.row._id)">编辑</el-button>
            </template>
        </el-table-column>
    </el-table>
</div>
</template>

<script>
import api from '../../http/apis/apis';
export default {
    data() {
        return {
            allClaims: [],
        }
    },
    created() {
        this.getClaims();
    },
    methods: {
        // ...mapActions(['getItem'])
        async getClaims() {
            const _id = sessionStorage.getItem('admin_id');
            // console.info(_id);
            const {
                data
            } = await api.claimApi.getClaims({
                _id
            });
            if (data.status) {
                this.allClaims = data.data;
            }
        },
        editClaims(id) {
            //把id传过去
            this.$router.push({
                path: '/System/ClaimOrder/ModClaim/' + id
            })
        }
    },
}
</script>

<style lang="scss" scoped>
@import '../../assets/scss/public/sector.scss';
</style>
